import { createApp } from 'vue'
import { createPinia } from 'pinia'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import App from './App.vue'
import router from './router'
import { i18n } from '@/locales'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import './assets/css/icon.css'

const app = createApp(App)
app.use(ElementPlus)
app.use(createPinia())
app.use(i18n)
app.use(router)

// 注册elementplus图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
// 自定义权限指令
app.directive('permiss', {
  mounted() {
    // if (binding.value && !permiss.key.includes(String(binding.value))) {
    //     el['hidden'] = true;
    // }
  }
})

app.mount('#app')
